package shiyansan;
class PC {
    private CPU cpu;
    private HardDisk HD;
    public PC(CPU c, HardDisk h) {
        this.cpu = c;
        this.HD = h; 
    }

    public void setCPU(CPU c) {
        this.cpu = c;
    }

    public void setHardDisk(HardDisk h) {
        this.HD = h; 
    }

    public void show() {
        System.out.println("CPU速度: " + cpu.getSpeed());
        System.out.println("硬盘容量: " + HD.getAmount());
    }
}
